import { createHashRouter } from "react-router-dom";
import Login from "../modules/Login";
import App from "../modules/App";
import LandingPageRoute from './landing-page';
import ProdInboundRoute from './prod-inbound';
import SaleOutboundRoute from './sale-outbound';
import TmpPalletRoute from './tmp-pallet';
import FrmPalletRoute from './frm-pallet';
import UnpackRoute from './unpack';
import TransferInRoute from './transfer-in';
import TransferOutRoute from './transfer-out';
import OtherInRoute from './other-in';
import OtherOutRoute from './other-out';
import OrderMoveRoute from './order-move';
import MoveDirectlyRoute from './move-directly';
import StocktakingRoute from './stocktaking';
import WarehouseQueryRoute from './warehouse-query';

const routes = [
  {
    path: '/',
    element: <Login />
  },
  {
    path: '/app',
    element: <App />,
    children: [
      LandingPageRoute,
      ProdInboundRoute,
      SaleOutboundRoute,
      TmpPalletRoute,
      FrmPalletRoute,
      UnpackRoute,
      TransferInRoute,
      TransferOutRoute,
      OtherInRoute,
      OtherOutRoute,
      OrderMoveRoute,
      MoveDirectlyRoute,
      StocktakingRoute,
      WarehouseQueryRoute
    ]
  }
];

const router = createHashRouter(routes);

export default router;